Skip to content

ci: build the documentation site in CI and configure its Netlify deployment - #531

Open
dupontbertrand wants to merge 3 commits into
meteor:release-3.1.0from
dupontbertrand:ci/docs-build
Open

dupontbertrand wants to merge 3 commits into
meteor:release-3.1.0from
dupontbertrand:ci/docs-build

Conversation

@dupontbertrand

@dupontbertrand dupontbertrand commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Builds on #530, which makes the site build at all; the first commit here is that one. This PR is the CI item of the documentation review asked in #492.

What is broken today

  • blazejs.org is frozen. It is a Netlify site (blazejs.netlify.app) serving the Hexo build of master. Its changelog page stops at v3.0.1 (November 2024): 3.0.2 and 3.0.3 never reached it. The Hexo 3.9 toolchain does not build on a current Node anymore: on Node 26 every page fails with isDate is not a function and only the four logo files come out.
  • Nothing tells Netlify how to build the VitePress site. There is no netlify.toml in the repository, so the build settings live in the Netlify UI, where they still describe the Hexo build. The day release-3.1.0 reaches master, that build fails on a package.json that has no build script, and the site stays frozen.
  • The GitHub Pages workflow never ran. deploy.yml listens to a main branch that does not exist, GitHub Pages is disabled on the repository (has_pages: false), and the file only exists on release-3.1.0 while GitHub registers workflows from the default branch. In docs: migrate to vitepress #494 @jankapunkt wrote he has no access to the publishing side and @italojs said he prefers to stay on Netlify for the deploy previews.
  • No CI builds the site, which is how the dead links and the Hexo tags fixed in docs: make the VitePress site build and document the optional jQuery backend #530 went unnoticed since the migration.

Changes

  • netlify.toml at the repository root: base site, command npm run docs:init && npm run docs:api && npm run docs:build, publish .vitepress/dist, Node 22. Netlify installs the site/ dependencies itself, and settings in this file take precedence over the UI, so the first push of the VitePress site to master deploys it. Pull requests get deploy previews again, provided the Netlify site is still linked to this repository: that part can only be checked from the Netlify side.
  • .github/workflows/docs.yml, on pull requests and pushes to master: install, docs:init, docs:api, then git diff --exit-code -- site/source/api so a JSDoc change that was not regenerated into the committed API pages fails the check, then docs:build, which fails on dead links and on pages Vue cannot compile.
  • deploy.yml removed. If the TSC prefers GitHub Pages over Netlify, it needs Pages enabled on the repository and the DNS moved anyway, so it is better restored on purpose than kept broken.
  • site/package.json pins vitepress, jsdoc and jsdoc-to-markdown to the versions in use today. The repository ignores package-lock.json, so the ranges were the only thing fixing the toolchain, and the generated API pages have to come out identical in CI and locally for the check above to hold.
  • site/README.md documents the VitePress commands instead of the Hexo ones.
  • site/.vitepress/config.mts sets base to /: the /blaze/ value came from the GitHub Pages preview of docs: migrate to vitepress #494 and sent every asset and internal link of a build under a path blazejs.org does not serve. The logo files move from site/source/logo/, their Hexo location, to site/source/public/logo/, the only folder VitePress copies into the build; the dev server served them from the old place, which is why the preview looked fine.

Verification

  • The four workflow steps run locally in that order on this branch: install, init and regenerate, git diff --exit-code on site/source/api is empty, build succeeds.
  • netlify.toml parses, and its paths follow the Netlify rule that paths are relative to the base directory.
  • The Docs check on this PR is the workflow itself.

Not covered

Whether the Netlify site is still connected to this repository with automatic builds on, and which branch it builds. Someone with access to the Netlify account (@italojs, @nachocodoner) needs to confirm that; nothing in the repository can.

…backend

The site did not build on release-3.1.0: `vitepress build` stopped on
dead links (the /repo pages that `docs:init` is supposed to link, and
relative ./packages/* links in the architecture page), `docs:init`
itself failed because source/repo/ does not exist in the repository,
and the pages linked from the repository root (README, HISTORY) made
Vue choke on the {{mustaches}} in their inline code. Three pages still
carried Hexo tags ({% apibox %}, {% dtdd %}, {% changelog %}, {% raw %})
that VitePress prints verbatim.

- api/templates.md: every {% apibox %} becomes a heading with the
  signature, the summary and the arguments from the JSDoc, keeping the
  anchors Hexo generated (Template-events, Blaze-TemplateInstance-findAll,
  ...) so existing deep links keep working; the {% dtdd %} lists become
  Markdown lists; the event object section covers both DOM backends.
- changelog.md includes HISTORY.md directly instead of the Hexo tag.
- Inline code gets v-pre through a markdown-it rule, as fenced blocks
  already do, so {{...}} in backticks is no longer interpolated.
- docs:init creates source/repo and links only the three files the site
  references, instead of every Markdown file at the repository root.
- Dead links fixed in dev/architecture.md and guide/testing.md; the
  "Edit this page" pattern pointed at site/sources/.

The migration guide said jQuery was removed; it is optional, and Blaze
keeps using it when the jquery package is present. The guide now says
so and lists what changes without jQuery. The JSDoc, the generated API
page and the TypeScript declaration of TemplateInstance.$ describe both
return types (jQuery object or array of elements).
…oyment

blazejs.org is a Netlify site that still serves the Hexo build of master,
frozen before 3.0.2: the Hexo 3.9 toolchain no longer builds on a current
Node (every page fails with "isDate is not a function"), and nothing in
the repository tells Netlify how to build the VitePress site that
replaced it on release-3.1.0. The GitHub Pages workflow added with the
migration never ran: it listens to a `main` branch that does not exist,
Pages is disabled on the repository, and the workflow only exists on the
release branch while GitHub registers workflows from the default branch.

- netlify.toml: base `site`, the three build commands, publish
  `.vitepress/dist`, Node 22. Netlify reads this file before its UI
  settings, so the first push of the VitePress site to master deploys
  it, and pull requests get deploy previews again if the site is still
  linked to the repository.
- .github/workflows/docs.yml: installs the site, links the repository
  pages, regenerates the API pages and fails when they differ from the
  committed ones, then builds the site. Runs on pull requests and on
  pushes to master.
- deploy.yml removed. It cannot work as it is, and the maintainers said
  in meteor#494 they prefer Netlify.
- The documentation toolchain is pinned to exact versions, since the
  repository ignores package-lock.json and the generated API pages must
  come out identical in CI and locally.
- site/README.md describes the VitePress commands instead of Hexo.
@dupontbertrand dupontbertrand mentioned this pull request Nov 7, 2026
31 of 33 tasks
@jankapunkt

jankapunkt commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

@nachocodoner @italojs do you have access to the netlify build/configuration etc. and check if this PR would be solving the build issue for our next docs? We have switched to Vitepress but its not yet "active" but will be picked up by CI, once #492 is merged.

Edit: apparently the build is already successful - https://github.com/meteor/blaze/actions/runs/42372903664/job/128404506885 we only do not know where to view the results for this non-official build

@jankapunkt jankapunkt added this to the 3.1 milestone Nov 11, 2026
The site config kept `base: '/blaze/'` from the GitHub Pages preview of
meteor#494, so every asset and internal link of a build came out under
`/blaze/`, a path blazejs.org does not serve. The logo files also stayed
in `site/source/logo/`, their Hexo location, which VitePress does not
copy into the build: the logo, the favicon and the home page image were
missing from the output while the dev server kept serving them.

Set the base to `/` and move the logo folder under `site/source/public/`.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants